home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 33 / Amiga Format AFCD33 (Issue 117, Dec 1998).iso / -seriously_amiga- / graphics / infompeg / infompeg.h < prev    next >
C/C++ Source or Header  |  1998-09-07  |  2KB  |  71 lines

  1. /*
  2.  * Header file for InfoMPEG
  3.  * Copyright (C) 1993 Dennis Lee
  4.  */
  5.  
  6. /* #define BORLAND */
  7. #define MAX_FILES         200
  8. #define MAX_CYCLE_LEN     1000
  9.  
  10. #ifndef AMIGA
  11. #define ULONG             unsigned long
  12. #endif
  13.  
  14. #ifndef __SASC
  15. typedef enum {NO, YES}     yes_or_no;
  16. typedef enum {FALSE, TRUE} boolean;
  17. #else
  18. typedef ULONG boolean;
  19. typedef boolean yes_or_no;
  20. #define YES TRUE
  21. #define NO  FALSE
  22. #endif
  23.  
  24. typedef struct {
  25.     long sum_frames;       /* number of frames of one type */
  26.     long sum_frame_len;    /* number of bytes for all frames of one type */
  27.     } frame_type_sums;
  28.  
  29. typedef struct {
  30.     enum {I=1,P,B} frame_type;
  31.     long frame_len;
  32.     } frame_info;
  33.  
  34. typedef struct {
  35.     char name[40];
  36.     long size;
  37.     char resolution[15];
  38.     short frames;
  39.     char frame_types_found[5];
  40.     short compression;
  41.     } file_info;
  42.  
  43. long file_offset;
  44. long total_frames;
  45. long height, width;
  46. short report_info_type;
  47. short previous_frame;
  48. char frame_types[5]={' ','I','P','B'};
  49. char frame_cycle[MAX_CYCLE_LEN];
  50. short cycle_len;
  51. boolean cycle_exists;
  52. frame_type_sums frame_sums[3];
  53. ULONG tot_len=0;          /* total uncompressed length of all MPEG streams */
  54. short num_files;
  55. file_info files[MAX_FILES];
  56.  
  57. #ifdef BORLAND
  58.   char *get_path(char *);
  59.   void expand_cmd_line(short *, char ***);
  60. #endif
  61.  
  62. void usage(void);
  63. void get_name(char *);
  64. void get_stream_res(FILE *);
  65. void get_frame_info(yes_or_no, FILE *);
  66. void next_start_code(FILE *);
  67. void init_vars(void);
  68. void report_info(char *, FILE *);
  69. void sort_files(short, short);
  70. void report_comparison(void);
  71.